package io.netty.myExample.duyutian.fastThreadLocal测试;

/**
 * @author duyutian
 * @version 1.0
 * @date 2020/6/17 11:33
 */
public class ThreadLocalTest {
    public static void main(String[] args) throws InterruptedException {
        ThreadLocal<String> threadLocal = new ThreadLocal<String>();
        threadLocal.set("hello world thread Local");
        System.out.println(threadLocal.get());
        //threadLocal.remove();
        System.out.println(threadLocal.get());
        Thread s = new Thread(new Runnable() {
            @Override
            public void run() {
                ThreadLocal<String> threadLocal1 = new ThreadLocal<String>();
                threadLocal1.set("hello world thread Local");
                System.out.println("执行完了");
            }
        });
        s.start();
        s.join();
        System.out.println("hah");


    }
}
